<div class="login">
  <div class="title">
    <img src="../../../assets/images/logo@2x.png" alt="">
    <span *ngIf="!showWz">苏州市电梯无纸化在线维保综合管理平台</span>
    <span *ngIf="showWz">吴中区电梯智慧管理系统</span>

    <button style="float:right;top:15px;right:20px;" nz-button [nzType]="'primary'" (click)="showModal()">
      <span>App下载</span>
    </button>

  </div>
  <nz-spin [nzSpinning]="isSpinning" style="width: 100%;height:84%">
    <div class="login_bg">
      <img src="/assets/images/bg@3x.jpg" alt="" class="login_bg_img">

      <div class="login_form">
       <!-- <ul class="login_tab">
          <li [ngClass]="{'active':showActive == 1}" (click)='safety()'>安全监管</li>
          <li [ngClass]="{'active':showActive == 2}" (click)='maintenance()'>维保单位</li>
          <li [ngClass]="{'active':showActive == 3}" (click)='useCompany()'>使用单位</li>
          <li [ngClass]="{'active':showActive == 4}" (click)='checkCompany()'>检验单位</li>
        </ul>
-->
        <ul class="login_content">

          <!-- 安全监管 -->
          <li *ngIf="showActive == 1">
            <form [formGroup]="validateForm">
              <div class="first_div">
                <img src="../../../assets/images/ueer@3x.png" alt="">
                <span>|</span>
                <input type="text" placeholder="请输入用户名" formControlName="userName" [(ngModel)]="loginBean.userName"
                       name="userName">
                <div class="reminder" *ngIf="validateForm.controls.userName.dirty&&validateForm.controls.userName.hasError('required')">
                  <span>!</span>
                  <span>请输入用户名</span>
                </div>
              </div>
              <div class="second_div">
                <img src="../../../assets/images/password@3x.png" alt="">
                <span>|</span>
                <input type="password" placeholder="请输入密码" formControlName="password" [(ngModel)]="loginBean.password"
                       name="password">
                <div class="reminder" *ngIf="validateForm.controls.password.dirty&&validateForm.controls.password.hasError('required')">
                  <span>!</span>
                  <span>请输入密码</span>
                </div>
                <div class="reminder" *ngIf="reminder_err">
                  <span>!</span>
                  <span>{{reminder_message}}</span>
                </div>
              </div>
              <div class="thrid_div">
                <button (click)='_submitForm()'>登&nbsp;&nbsp;&nbsp;&nbsp;录</button>
              </div>
              <div class="last_div">
                <span (click)='forget(titleforget,contentforget,footerforget)'>忘记密码?&nbsp;&nbsp;</span>
                <span>没有账号？</span>
                <span (click)='register()' class="register">去注册</span>
              </div>
            </form>
          </li>

          <!-- 维保单位 -->
          <li *ngIf="showActive == 2">
            <form [formGroup]="validateForm">
              <div class="first_div">
                <img src="../../../assets/images/ueer@3x.png" alt="">
                <span>|</span>
                <input type="text" placeholder="请输入用户名" formControlName="userName" [(ngModel)]="loginBean.userName"
                       name="userName">
                <div class="reminder" *ngIf="validateForm.controls.userName.dirty&&validateForm.controls.userName.hasError('required')">
                  <span>!</span>
                  <span>请输入用户名</span>
                </div>
              </div>
              <div class="second_div">
                <img src="../../../assets/images/password@3x.png" alt="">
                <span>|</span>
                <input type="password" placeholder="请输入密码" formControlName="password" [(ngModel)]="loginBean.password"
                       name="password">
                <div class="reminder" *ngIf="validateForm.controls.password.dirty&&validateForm.controls.password.hasError('required')">
                  <span>!</span>
                  <span>请输入密码</span>
                </div>
                <div class="reminder" *ngIf="reminder_err">
                  <span>!</span>
                  <span>{{reminder_message}}</span>
                </div>
              </div>
              <div class="thrid_div">
                <button (click)='_submitForm()'>登&nbsp;&nbsp;&nbsp;&nbsp;录</button>
              </div>
              <div class="last_div">
                <span (click)='forget(titleforget,contentforget,footerforget)'>忘记密码?&nbsp;&nbsp;</span>

                <span>没有账号？</span>
                <span (click)='register()' class="register">去注册</span>
              </div>
            </form>
          </li>

          <!-- 使用单位 -->
          <li *ngIf="showActive == 3">
            <form [formGroup]="validateForm">
              <div class="first_div">
                <img src="../../../assets/images/ueer@3x.png" alt="">
                <span>|</span>
                <input type="text" placeholder="请输入用户名" formControlName="userName" [(ngModel)]="loginBean.userName"
                       name="userName">
                <div class="reminder" *ngIf="validateForm.controls.userName.dirty&&validateForm.controls.userName.hasError('required')">
                  <span>!</span>
                  <span>请输入用户名</span>
                </div>
              </div>
              <div class="second_div">
                <img src="../../../assets/images/password@3x.png" alt="">
                <span>|</span>
                <input type="password" placeholder="请输入密码" formControlName="password" [(ngModel)]="loginBean.password"
                       name="password">
                <div class="reminder" *ngIf="validateForm.controls.password.dirty&&validateForm.controls.password.hasError('required')">
                  <span>!</span>
                  <span>请输入密码</span>
                </div>
                <div class="reminder" *ngIf="reminder_err">
                  <span>!</span>
                  <span>{{reminder_message}}</span>
                </div>
              </div>
              <div class="thrid_div">
                <button (click)='_submitForm()'>登&nbsp;&nbsp;&nbsp;&nbsp;录</button>
              </div>
              <div class="last_div">
                <span (click)='forget(titleforget,contentforget,footerforget)'>忘记密码?&nbsp;&nbsp;</span>

                <span>没有账号？</span>
                <span (click)='register()' class="register">去注册</span>
              </div>
            </form>
          </li>

          <!-- 检验单位 -->
          <li *ngIf="showActive == 4">
            <form [formGroup]="validateForm">
              <div class="first_div">
                <img src="../../../assets/images/ueer@3x.png" alt="">
                <span>|</span>
                <input type="text" placeholder="请输入用户名" formControlName="userName" [(ngModel)]="loginBean.userName"
                       name="userName">
                <div class="reminder" *ngIf="validateForm.controls.userName.dirty&&validateForm.controls.userName.hasError('required')">
                  <span>!</span>
                  <span>请输入用户名</span>
                </div>
              </div>
              <div class="second_div">
                <img src="../../../assets/images/password@3x.png" alt="">
                <span>|</span>
                <input type="password" placeholder="请输入密码" formControlName="password" [(ngModel)]="loginBean.password"
                       name="password">
                <div class="reminder" *ngIf="validateForm.controls.password.dirty&&validateForm.controls.password.hasError('required')">
                  <span>!</span>
                  <span>请输入密码</span>
                </div>
                <div class="reminder" *ngIf="reminder_err">
                  <span>!</span>
                  <span>{{reminder_message}}</span>
                </div>
              </div>
              <div class="thrid_div">
                <button (click)='_submitForm()'>登&nbsp;&nbsp;&nbsp;&nbsp;录</button>
              </div>
              <div class="last_div">
                <span (click)='forget(titleforget,contentforget,footerforgettitleforget,contentforget,footerforget)'>忘记密码?&nbsp;&nbsp;</span>
                <span>没有账号？</span>
                <span (click)='register()' class="register">去注册</span>
              </div>
            </form>
          </li>
        </ul>
      </div>

    </div>
  </nz-spin>
  <div class="bottom_detail">
    copyright  2019 苏州市市场监督管理局版权所有    技术支持：江苏华阳特安检测科技有限公司 ICP证：<a href="http://www.beian.miit.gov.cn">苏ICP备18027996号-1</a>
  </div>


  <ng-template #titleforget>
    <span>找回密码</span>
  </ng-template>
  <ng-template #contentforget>
    <form nz-form>
      <!-- <div nz-form-item nz-row>

        <div nz-form-label nz-col [nzSm]="9" [nzXs]="9">
          <label for="getUserCode">登录账户</label>
        </div>
        <div nz-form-control nz-col [nzSm]="9" [nzXs]="9" nzHasFeedback>
          <nz-input name="getUserCode" [nzId]="'getUserCode'" [nzSize]="'large'" [(ngModel)]="getUserCode"></nz-input>
        </div>
      </div> -->
      <div nz-form-item nz-row>
        <div nz-form-label nz-col [nzSm]="9" [nzXs]="9">
          <label for="getUserEmail">预留的邮箱</label>
        </div>
        <div nz-form-control nz-col [nzSm]="9" [nzXs]="9" nzHasFeedback>
          <nz-input name="getUserEmail" [nzId]="'getUserEmail'" [nzSize]="'large'" [(ngModel)]="getUserEmail"></nz-input>
        </div>

      </div>
      <div style="text-align: center;">
        <button nz-button (click)="getMyPassWord()" [nzSize]="'large'" [nzType]="'primary'">确定</button>
      </div>

    </form>

  </ng-template>
  <ng-template #footerforget>
    <div>
    </div>
  </ng-template>


  <nz-modal class="dowload" [nzVisible]="isVisible" [nzWidth]="700" [nzTitle]="'下载地址'" [nzContent]="modalContent"
            (nzOnCancel)="handleCancel($event)">
    <ng-template #modalContent>
      <div>
        <p><img src="{{config.PREVIEW_URL+androidDw}}"></p>
        <p><img src="{{config.PREVIEW_URL+iosDw}}"></p>
      </div>
      <div>
        <p>安卓</p>
        <p>IOS</p>
      </div>
    </ng-template>
  </nz-modal>

</div>
